import fetch from 'utils/fetch';

//查询所有省
export function queryAllProvince() {
    const params = {

    };
    return fetch({
        url: '/school/queryAllProvince',
        method: 'get',
        params
    });
}
//查询所有市
export function queryAllCityByProvinceId(provinceId) {
    const params = {
        provinceId
    };
    return fetch({
        url: '/school/queryAllCityByProvinceId',
        method: 'get',
        params
    });
}
//查询所有区
export function queryAllAreaByCityId(cityId) {
    const params = {
        cityId
    };
    return fetch({
        url: '/school/queryAllAreaByCityId',
        method: 'get',
        params
    });
}
//根据名称模糊查询学校名称
export function querySchoolByName(schoolName,provinceId,cityId,areaId) {
    const data = {
        schoolName,
        provinceId,
        cityId,
        areaId
    };
    return fetch({
        url: '/school/querySchoolByName',
        method: 'post',
        data
    });
  }

//根据名称模糊查询父校名称
export function listParentSchool(schoolName,schoolId) {
    const data = {
        schoolName,
        schoolId
    };
    return fetch({
        url: '/school/listParentSchool',
        method: 'post',
        data
    });
  }  
  


//根据名称模糊查询科目
export function querySubjectByName(subjectName) {
    const data = {
        subjectName
    };
    return fetch({
        url: '/school/querySubjectByName',
        method: 'post',
        data
    });
  }

  //获取创建人列表
export function findCreater(creatorName) {
    const data = {
        creatorName
    };
    return fetch({
        url: '/activity/getCreatorList',
        method: 'post',
        data
    });
  }
